package day06.tree;

import day06.dto.TreeDTO;

import java.util.TreeSet;

/**
 * @Auther: sky
 * @Date: 2019/2/28 22:52
 * @Description:
 */
public class TreeSetTest {

    public static void main(String[] args) {
        TreeSet<TreeDTO> treeSet = new TreeSet<TreeDTO> ();
        TreeDTO treeDTO = new TreeDTO();
        treeDTO.setA(11);
        treeDTO.setI(12);

        TreeDTO treeDTO1 = new TreeDTO();
        treeDTO1.setA(22);
        treeDTO1.setI(22);
        treeSet.add(treeDTO);
        treeSet.add(treeDTO1);
        for (TreeDTO i: treeSet) {
            System.out.println(i.getA());
        }
    }

}
